package com.andy.web.dao;

public class ShardingContextHolder {

	private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();
	
	public static void setDataSource(String dsKey) {
		contextHolder.set(dsKey);
	}
	
	public static String getDataSource() {
		return contextHolder.get();
	}
	
	public static void clearDataSourceKey() {
		contextHolder.remove();
	}
}
